<?php
/**
 * File : AddTranslationGenerator.php
 * Created by Ludovic Reenaers
 * Created on  9 nov. 2010
 * lreenaers@hotmail.com
 */
class AddTranslationGenerator extends Generator{

	function setUp(){

		$lngGen = new LngListGenerator($this->translator,$this->params,$this->Factory);
		$lnglist = $lngGen->dump();

		$labels = array('{ERROR-HERE}','{encoding}','{url}','{transName}','{traInfo}','{traLabel}','{traLabelInfo}','{lngList}','{addbutton}');

		$values = array($this->error,$_SESSION['encoding'],$_SESSION['config']->controler,$this->translator->transName,$this->translator->traInfo,$this->translator->traLabel,$this->translator->traLabelInfo,$lnglist,$this->translator->addbutton);
		$template = file_get_contents("html/templates/translationAdd");
		$this->content .=str_replace($labels,$values,$template);
	}
	function dump(){
		$this->setUp();
		return $this->content;
	}

}
?>